package com.example.myapplication.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.myapplication.R;
import com.example.myapplication.b_entity.Daxia;

import java.util.List;

public class Daxia_Adapter extends BaseQuickAdapter<Daxia.DataBean, BaseViewHolder> {
    public Daxia_Adapter(int layoutResId, @Nullable List<Daxia.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Daxia.DataBean item) {
        Glide.with(mContext)
                .load("http://5b0988e595225.cdn.sohucs.com/images/20180618/5a915fae934a4b11b1cdbc896d2598de.jpeg")
                .into((ImageView) helper.getView(R.id.item_img));
                helper.setText(R.id.item_text,item.getTitle());
                helper.addOnClickListener(R.id.item_img);
    }
}
